package com.mineplatform.mapper;

import java.util.ArrayList;
import java.util.List;

import com.mineplatform.domain.M_MineCategory;
import com.mineplatform.viewmodel.CategoryViewModel;

public class CategoryViewModelMapper {

	public static List<CategoryViewModel> parse(List<M_MineCategory> domainList) {

		List<CategoryViewModel> list = new ArrayList<CategoryViewModel>();
		for (M_MineCategory item : domainList) {
			CategoryViewModel vm = new CategoryViewModel();
			vm.setId(item.getId());
			vm.setTitle(item.getCategoryTitle());
			vm.setPicture(vm.getPicture());
			vm.setEnable(item.getCategoryEnable());
			vm.setPriority(item.getCategoryPriority());
			list.add(vm);
		}
		return list;
	}
}
